
package com.jiuqi.common.authority.ccp;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for resMenu.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="resMenuForm"
 */
public class ResMenuForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _menuId = null;
   private java.lang.String _menuTag = null;
   private java.lang.String _menuName = null;
   private java.lang.String _menuDesc = null;
   private java.lang.String _menuUrl = null;
   private java.lang.String _menuParentId = null;
   private java.lang.String _menuOrder = null;

   /**
    * Standard constructor.
    */
   public ResMenuForm() {
   }
   
   public java.lang.String getMenuOrder(){
	   return _menuOrder;
   }
   
   public void setMenuOrder(java.lang.String menuId) {
	   _menuOrder = menuId;
   }

   /**
    * Returns the menuId
    *
    * @return the menuId
    */
   public java.lang.String getMenuId() {
      return _menuId;
   }

   /**
    * Sets the menuId
    *
    * @param menuId the new menuId value
    */
   public void setMenuId(java.lang.String menuId) {
      _menuId = menuId;
   }
   /**
    * Returns the menuTag
    *
    * @return the menuTag
    */
   public java.lang.String getMenuTag() {
      return _menuTag;
   }

   /**
    * Sets the menuTag
    *
    * @param menuTag the new menuTag value
    */
   public void setMenuTag(java.lang.String menuTag) {
      _menuTag = menuTag;
   }
   /**
    * Returns the menuName
    *
    * @return the menuName
    */
   public java.lang.String getMenuName() {
      return _menuName;
   }

   /**
    * Sets the menuName
    *
    * @param menuName the new menuName value
    */
   public void setMenuName(java.lang.String menuName) {
      _menuName = menuName;
   }
   /**
    * Returns the menuDesc
    *
    * @return the menuDesc
    */
   public java.lang.String getMenuDesc() {
      return _menuDesc;
   }

   /**
    * Sets the menuDesc
    *
    * @param menuDesc the new menuDesc value
    */
   public void setMenuDesc(java.lang.String menuDesc) {
      _menuDesc = menuDesc;
   }
   /**
    * Returns the menuUrl
    *
    * @return the menuUrl
    */
   public java.lang.String getMenuUrl() {
      return _menuUrl;
   }

   /**
    * Sets the menuUrl
    *
    * @param menuUrl the new menuUrl value
    */
   public void setMenuUrl(java.lang.String menuUrl) {
      _menuUrl = menuUrl;
   }
   /**
    * Returns the menuParentId
    *
    * @return the menuParentId
    */
   public java.lang.String getMenuParentId() {
      return _menuParentId;
   }

   /**
    * Sets the menuParentId
    *
    * @param menuParentId the new menuParentId value
    */
   public void setMenuParentId(java.lang.String menuParentId) {
      _menuParentId = menuParentId;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getMenuId() == null) {
         errors.add("menuId", new ActionError("error.menuId.required"));
      }
      // TODO test format/data
      return errors;
   }
}
